package com.example.mytest.annotation4;

import org.springframework.core.annotation.AliasFor;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.lang.annotation.*;

/**
 * @ClassName: PathRestController
 * @Description: TODO SpringMVC的注解 @RestController @RequestMapping("/person") 可以合并为一个@PathRestController("/user")
 * @Author: 230689
 * @Date: 2021/9/8 17:16
 * @Version: v1.0
 */
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Documented
@RestController
@RequestMapping
public @interface PathRestController {
    @AliasFor("path")

    String[] value() default {};

    @AliasFor("value")

    String[] path() default {};

}
